package org.pay.core.service;

import org.pay.core.entity.MchChannel;

import java.util.List;
import java.util.Map;

/**
 * @author: yangshancheng
 * @date: 17/9/8
 * @description:
 */
public interface IMchChannelService {

    Map selectMchChannel(String jsonParam);

    int add(MchChannel mchChannel);

    int update(MchChannel mchChannel);

    MchChannel findById(int id);

    MchChannel findByMACId(Long mchId, String appId, String channelId);

    List<MchChannel> select(int pageIndex, int pageSize, MchChannel mchChannel);

    Integer count(MchChannel mchChannel);

    /**
     * 查询商户某个应用的渠道列表,和渠道配置关联
     * 如果应用自身配置了则使用应用自身的渠道配置,否则显示官方渠道配置
     * @param mchId
     * @param appId
     * @param scene
     * @return
     */
    List<MchChannel> selectByMch(Long mchId, String appId, Byte scene);

    /**
     * 传入一批渠道ID,返回状态正常的渠道列表
     * @param channelIds
     * @return
     */
    List<MchChannel> selectByChannelIds(MchChannel mchChannel, List<String> channelIds);

    List<MchChannel> selectAll(MchChannel mchChannel);

}
